DISCUSSION
You can register your callback function by calling the function
ATSUCreateMemorySetting and passing the constant
kATSUUseCallbacks in
iHeapSpec and a pointer to the
ATSUMemoryCallbacks union in
iMemoryCallbacks. You then supply a pointer of type
ATSUCustomGrowFunc in the
Grow field of the
callbacks structure of the
ATSUMemoryCallbacks union.
Note that your
MyATSUCustomGrowFunc function is expected to return a pointer to the start of the allocated memory, unless it terminates in an application.